home *** CD-ROM | disk | FTP | other *** search
- /* Script Rexx
- AnimPainting for Circle*/
-
- call addlib("rexxmathlib.library", 5, -30, 0)
-
- options results
- parse ARG Port x1 y1 r r3 b
- ADDRESS value Port
-
- pp_UpdateUndo
-
- r2=r/3
- r4=r3/3
- Pi=3.1415926/180
-
- pp_DialogInit 250 85 "*Star*" 2
- pp_Integer 0 110 5 50 16 "Number*of*Point*" 1 3
- pp_Cycle 1 110 25 100 16 "Option" 1 "Filled|Unfilled" 0
- pp_Dialog
- rc=result
- if rc=0 then
- do
- EXIT
- end
-
- pp_GetDialog 0
- s0=result
-
- pp_GetDialog 1
- sens=result
-
- a=360/s0
- a2=a/2
-
- pp_StartPoly
-
- DO i=0 To 359 by a
-
- x = Sin(i*Pi)*r+x1
- y = Cos(i*Pi)*r3+y1
-
- ii=i+a2
- x2 = Sin(ii*Pi)*r2+x1
- y2 = Cos(ii*Pi)*r4+y1
-
- ii=i-a2
- x3 = Sin(ii*Pi)*r2+x1
- y3 = Cos(ii*Pi)*r4+y1
-
- pp_AddPoly trunc(x3) trunc(y3)
- pp_AddPoly trunc(x) trunc(y)
- pp_AddPoly trunc(x2) trunc(y2)
-
- END
-
- IF sens=1 then DO
- pp_EndPoly
- END
- ELSE DO
- pp_EndPolyF
- END
-